const showFail = (title) => {
	uni.showToast({
		icon: "error",
		title
	})
}

const showSuccess = (title) => {
	uni.showToast({
		icon: "success",
		title
	})
}

const showMsg = (title) => {
	uni.showToast({
		icon: "none",
		title
	})
}
const closeMsg = () => {
	uni.hideToast();
}

const showLoading = (title = '处理中...', mask = true) => {
	uni.showLoading({
		title,
		mask
	})
	setTimeout(function() {
		closeLoading()
	}, 30000);
}

const closeLoading = () => {
	uni.hideLoading();
}

export default {
	showSuccess,
	showFail,
	showMsg,
	closeMsg,
	showLoading,
	closeLoading
}
